<?php
header("Content-Type: text/html;");
session_start();

define('ROOT_PATH', __DIR__ . '/../../');
define('VENDOR_PATH', __DIR__ . '/../../vendor/');
define('APP_PATH', __DIR__ . '/../../app/');
define('CONFIG_PATH', __DIR__ . '/../../app/Config/');
define('PUBLIC_PATH', __DIR__ . '/../../public/');

require VENDOR_PATH . 'autoload.php';
//加载App配置
require CONFIG_PATH . 'config.php';
//初始化应用程序对象
$app = new \Slim\App($config);
//获取容器对象
$container = $app -> getContainer();
//加载数据库配置
//require_once CONFIG_PATH . 'database.php';
//加载容器配置
require_once CONFIG_PATH . 'container.php';
//加载路由配置
require APP_PATH . 'routes.php';
//返回应用程序对象
return $app;
?>